package practice08;


public class Student extends Person{
    private Klass klass;

    public Klass getKlass(){
        return klass;
    }

    public Student(String name, Integer age) {
        super(name, age);
    }

    public Student(String name, Integer age, Klass klass) {
        super(name, age);
        this.klass = klass;
    }

    public Student(int i, String name, Integer age, Klass klass) {
        super(i, name, age);
        this.klass = klass;
    }

    @Override
    public String introduce(){
        if(klass.getLeader()==null){
            return super.introduce()+" I am a Student. I am at Class "+klass.getNumber()+".";
        }else{
            return super.introduce()+" I am a Student."+" I am Leader of Class "+klass.getNumber()+".";
        }

    }
}
